package com.xw.service.xw.hospital;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.xw.dao.DaoSupport;
import com.xw.util.PageData;

/**
 * 类名称: HospitalService
 * 类描述: 医院业务接口
 * @author : gce
 * @date   : 2017-11-30
 */
@Service("hospitalService")
public class HospitalService {
	
	@Resource(name = "daoSupport")
	private DaoSupport dao;
	
	/**
	 * 添加医院
	 * @param pd
	 * @return: void
	 * @author: gce
	 * @date  : 2017-11-30
	 */
	public void save(PageData pd) throws Exception{
		dao.save("HospitalMapper.save", pd);
	}
	
	/**
	 * 根据医院id，查询医院数据
	 * @param pd
	 * @return: PageData
	 * @author: gce
	 * @date  : 2017-11-30
	 */
	public PageData findById(PageData pd) throws Exception{
		return (PageData) dao.findForObject("HospitalMapper.findById", pd);
	}
	/**
	 * 
	 * @return
	 * @throws Exception 
	 */
	public List<PageData> getHospitalList(PageData pd) throws Exception{
		return (List<PageData>) dao.findForList("HospitalMapper.selectHospitalList", pd);
	}

}
